# coding=utf-8
from sqlalchemy import Column, Integer, String, Boolean, BigInteger

from db_models.orm_base import BaseOrmClass


class ParamEvalTest(BaseOrmClass):
    '''
    模型(表)备注:
cat测试
    '''
    __tablename__ = 'param_eval_test'

    '''      '''
    id = Column(BigInteger(), primary_key=True)

    '''      '''
    uid = Column(Integer(), nullable=False)

    '''      '''
    aid = Column(Integer(), nullable=False)

    '''   状态(0-测试中,1-测试完成)   '''
    status = Column(Boolean(), nullable=False)

    '''   得分(0-100之间)   '''
    score = Column(Integer(), nullable=False)

    '''   开始时间   '''
    start_time = Column(String(20), nullable=False)

    '''   结束时间   '''
    end_time = Column(String(20))

    '''   问题分区   '''
    qnum_part = Column(Integer(), nullable=False)

    '''   题量   '''
    qnums = Column(Integer(), nullable=False)

    '''   当前题ID(已做)   '''
    qid = Column(Integer(), nullable=False)

    '''   最后一个问题的ID   '''
    last_qid = Column(Integer(), nullable=False)

    def __repr__(self):
        return "param_eval_test(uid='{self.uid}',aid='{self.aid}',status='{self.status}',score='{self.score}',start_time='{self.start_time}')".format(self=self)

    def exclude(self): return ()
